home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DATAUTIL
/
DBASEUT1.LZH
/
F-KEYS.PRG
< prev
next >
Wrap
Text File
|
1986-03-14
|
3KB
|
121 lines
**************************************
* SET FUNCTION KEYS FOR DBASEIII *
* A USEFUL UTILITY FOR DBIII PRGRMRS *
* TO SAVE TYPING TIME DURING *
* A PROGRAMMING SESSION *
* by Charles Munao 3/14/86 *
**************************************
CLEAR
SET TALK OFF
SET BELL OFF
STORE SPACE(60) TO KEYT
STORE 2 TO CNT
STORE 10 TO E_CNT
STORE 8 TO LN
STORE 'A' TO ALL
STORE 'T' TO TMP
STORE 'E' TO EXIST
@ 1,0 SAY DATE()
@ 1,31 SAY 'SET FUNCTION KEYS'
@ 1,66 SAY 'Charles Munao'
@ 12,22 SAY '[E]xisting [N]ew or [D]efault Keys'
@ 12,60 GET EXIST PICTURE '!'
READ
CLEAR GETS
IF EXIST='E'
USE KEYS
CNT=2
LN=8
CLEAR
@ 6,29 SAY 'EXISTING FUNCTION KEYS'
DO WHILE CNT<11
GO CNT
@ LN,25 SAY 'f'+SUBSTR(STR(CNT),9,2)+'= '+KEY
SET FUNCTION CNT TO TRIM(KEY)+CHR(13)
CNT=CNT+1
LN=LN+1
ENDDO
CLOSE DATA
RETURN
ENDIF
IF EXIST='D'
USE D-KEYS
CNT=2
LN=8
CLEAR
@ 6,29 SAY 'DEFAULT FUNCTION KEYS'
DO WHILE CNT<11
GO CNT
@ LN,25 SAY 'f'+SUBSTR(STR(CNT),9,2)+'= '+KEY
SET FUNCTION CNT TO TRIM(KEY)+CHR(13)
CNT=CNT+1
LN=LN+1
ENDDO
CLOSE DATA
RETURN
ENDIF
CLEAR
@ 12,30 SAY '[A]ll keys or [S]ome'
@ 12,51 GET ALL PICTURE '!'
@ 14,30 SAY '[S]ave or [T]emporary'
@ 14,52 GET TMP PICTURE '!'
READ
CLEAR GETS
IF TMP='S'
USE KEYS
APPEND BLANK
ENDIF
IF ALL='A'
EXIT
ELSE
STORE 00 TO CNT
@ 16,30 SAY 'Start at f key # '
@ 16,46 GET CNT PICTURE '##' RANGE 2,10
@ 18,30 SAY 'End at f key # '
@ 18,46 GET E_CNT PICTURE '##' RANGE CNT,10
READ
CLEAR GETS
ENDIF ****** how many keys ? ****
CLEAR
@ 1,0 SAY DATE()
@ 1,31 SAY 'SET FUNCTION KEYS'
@ 1,66 SAY 'Charles Munao'
DO WHILE CNT<=E_CNT
@ 6,30 SAY 'FUNCTION KEY # :'
@ 6,46 SAY SUBSTR(STR(CNT),9,2)
@ LN,5 SAY 'SET f'+SUBSTR(STR(CNT),9,2)+' TO '
DO CASE
CASE TMP='T'
@ LN,18 GET KEYT
READ
CLEAR GETS
IF KEYT=' '
RETURN
ENDIF **** exit loop ****
SET FUNCTION CNT TO TRIM(KEYT)+CHR(13)
CASE TMP='S'
GO CNT
@ LN,18 GET KEY
READ
CLEAR GETS
REPLACE KEY WITH TRIM(KEY)
IF KEY=' '
CLOSE DATA
RETURN
ENDIF
SET FUNCTION CNT TO TRIM(KEY)+CHR(13)
ENDCASE
@ LN,0 CLEAR
IF TMP='S'
@ LN,5 SAY 'F'+SUBSTR(STR(CNT),9,2)+' = '+KEY
ELSE
@ LN,5 SAY 'F'+SUBSTR(STR(CNT),9,2)+' = '+KEYT
STORE SPACE(60) TO KEYT
ENDIF
STORE SPACE(60) TO KEY
CNT=CNT+1
LN=LN+1
ENDDO
CLOSE DATA
RETURN